Electronic camera that adjusts the distance from an optical lens to an imaging surface

ABSTRACT

An electronic camera includes an image sensor. The image sensor has an imaging surface irradiated with an optical image of an object scene through a focus lens and repeatedly generates an object scene image. A CPU executes an AF process for adjusting a distance from the focus lens to the imaging surface to a distance corresponding to a focal point, based on the object scene image generated by the image sensor. However, the CPU has a high-luminance excluding function for excluding from a target to be noticed of the AF process a partial image having a luminance exceeding “TH1” out of the object scene image generated by the image sensor. The CPU determines whether or not a partial image having a luminance exceeding “TH2” larger than “TH1” exists on the object scene image generated by the image sensor, and turns on the high-luminance excluding function when a determination result is affirmative and turns off the high-luminance excluding function when the determination result is negative.

CROSS REFERENCE OF RELATED APPLICATION

The disclosure of Japanese Patent Application Nos. 2007-219874 and2007-220121 which were filed on Aug. 27, 2007 is incorporated herein byreference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an electronic camera. Morespecifically, the present invention relates to an electronic camera thatreferences an object scene image generated on an imaging surface toadjust a distance from an optical lens to the imaging surface.

2. Description of the Related Art

According to one example of this type of camera, a plurality of focusevaluation values respectively corresponding to a plurality of blocks onan imaging surface are obtained by each lens position. Focusing controlis executed based on a focus evaluation value, out of the plurality offocus evaluation values thus obtained, corresponding to a blockdifferent from a block to which a low-contrast image or a high-luminanceimage belongs. Thereby, it becomes possible to avoid a situation wherethe focusing control fails when capturing an object, such as a lightsource, of which the focus evaluation value increases as a degree offocus decreases.

However, among high-luminance objects, there exists an object of whichthe focus evaluation value does not increase irrespective of thedecrease in degree of focus (a white board, a white-colored pillar, forexample). In the above-described camera, an image of such an object isexcluded from a target of the focusing control. Thereby, it becomesprobable that a focus adjusting operation becomes unstable.

Also, when a reference value for determining whether or not a block is ablock to which the high-luminance image belongs is set low, even theblock to which an image required for the focusing control belongs isexcluded. As a result, the focusing control may be impossible. Incontrary, when the above-described reference value is set high, it isnot possible to exclude a block to which a high-luminance blurred imageon a periphery of the light source belongs, and thus, there is aprobability that the focusing control fails.

SUMMARY OF THE INVENTION

An electronic camera according to the present invention comprises: animager, having an imaging surface irradiated with an optical image of anobject scene through an optical lens, for repeatedly generating anobject scene image; an adjustor for adjusting a distance from theoptical lens to the imaging surface to a distance corresponding to afocal point, based on the object scene image generated by the imager; anexcluder for excluding from a target to be noticed of the adjustor afirst portion image having a luminance exceeding a first thresholdvalue, out of the object scene image generated by the imager; and acontroller for determining whether or not a second portion image havinga luminance exceeding a second threshold value larger than the firstthreshold value exists on the object scene image generated by the imagerso as to start the excluder when a determination result is affirmativewhile stop the excluder when the determination result is negative.

Preferably, the determiner renders the determination result affirmativewhen a ratio of a pixel having a luminance exceeding the secondthreshold value to the first portion image exceeds a reference.

Preferably, a pixel detector for detecting a specific pixel having aluminance exceeding the second threshold value from the object sceneimage generated by the imager is further provided, in which thedeterminer executes a determining process based on the number ofspecific pixels detected by the pixel detector. Further preferably, thepixel detector detects the specific pixel from within the first portionimage.

Preferably, a decreasor for decreasing the first threshold valueaccording to an increase of the second portion image is furtherprovided.

Preferably, an integrator for integrating a high-frequency component ofthe object scene image generated by the imager is further provided, inwhich the adjustor includes an adjustment executor for executing anadjusting process by referencing an integral result of the integrator,and the excluder prohibits the integral process of the integratorcorresponding to the first portion image.

Further preferably, the integrator individually integrates a pluralityof high-frequency components respectively corresponding to a pluralityof areas allocated on the imaging surface, and the adjustor furtherincludes a designator for sequentially designating each of the pluralityof areas as an area to be noticed, and a modifier for modifying theintegral result of the integrator corresponding to the area to benoticed to a lower value, as a brightness of a partial image belongingto one or more areas including the area to be noticed is higher.

More preferably, the modifier includes a first modification processorfor executing a first modification process according to a firstarithmetic expression when a brightness of a partial image belonging tothe area to be noticed exceeds a third threshold value, and a secondmodifier for executing a second modification process according to asecond arithmetic expression when a brightness of a partial imagebelonging to an adjacent area adjacent to the area to be noticed exceedsa fourth threshold value.

In a certain aspect, the first modification process and the secondmodification process are selectively executed, and the firstmodification process takes precedence to the second modificationprocess.

In another aspect, the first arithmetic expression includes a processfor subtracting a numerical value indicating the integral result of thearea to be noticed by a normalization value of a numerical valueindicating the brightness of the area to be noticed, and the secondarithmetic expression includes a process for subtracting the numericalvalue indicating the integral result of the area to be noticed by anormalization value of a difference between the numeral value indicatingthe brightness of the area to be noticed and a numerical valueindicating a brightness of the adjacent area.

An imaging control program product according to the present invention isan imaging control program product executed by a processor of anelectronic camera comprising an imager, having an imaging surfaceirradiated with an optical image of an object scene through an opticallens, for repeatedly generating an object scene image. The imagingcontrol program product comprises: an adjusting step of adjusting adistance from the optical lens to the imaging surface to a distancecorresponding to a focal point, based on the object scene imagegenerated by the imager; an excluding step of excluding a first portionimage having a luminance exceeding a first threshold value from a targetto be noticed of the adjustor, out of the object scene image generatedby the imager; and a controlling step of determining whether or not asecond portion image having a luminance exceeding a second thresholdvalue larger than the first threshold value exists on the object sceneimage generated by the imager so as to start the excluding step when adetermination result is affirmative while stop the excluding step whenthe determination result is negative.

An imaging control method according to the present invention is animaging control method executed by an electronic camera comprising animager, having an imaging surface irradiated with an optical image of anobject scene through an optical lens, for repeatedly generating anobject scene image. The imaging control method comprises: an adjustingstep of adjusting a distance from the optical lens to the imagingsurface to a distance corresponding to a focal point, based on theobject scene image generated by the imager; an excluding step ofexcluding a first portion image having a luminance exceeding a firstthreshold value from a target to be noticed of the adjustor, out of theobject scene image generated by the imager; and a controlling step ofdetermining whether or not a second portion image having a luminanceexceeding a second threshold value larger than the first threshold valueexists on the object scene image generated by the imager so as to startthe excluding step when a determination result is affirmative while stopthe excluding step when the determination result is negative.

An electronic camera according to the present invention comprises: animager, having an imaging surface irradiated with an optical image of anobject scene through an optical lens, for repeatedly generating anobject scene image; an allocator for allocating a plurality of areas onthe object scene captured by the imaging surface; a detector fordetecting a degree of focus of a partial image belonging to each of theplurality of areas allocated by the allocator, out of the object sceneimage generated by the imager; a designator for sequentially designatingeach of the plurality of areas allocated by the allocator as an area tobe noticed; a modifier for modifying the degree of focus detected by thedetector corresponding to the area to be noticed to a lower value, as abrightness of the partial image belonging to one or more areas includingthe area to be noticed is higher; and an adjustor for adjusting adistance from the optical lens to the imaging surface to a distancecorresponding to a focal point by referencing the degree of focusmodified by the modifier.

Preferably, the modifier includes a first modifier for executing a firstmodification process according to a first arithmetic expression when abrightness of a partial image belonging to the area to be noticedexceeds a first threshold value, and a second modifier for executing asecond modification process according to a second arithmetic expressionwhen a brightness of a partial image belonging to an adjacent areaadjacent to the area to be noticed exceeds a second threshold value.

Further preferably, the first modification process and the secondmodification process are selectively executed, and the firstmodification process takes precedence to the second modificationprocess.

More preferably, the first arithmetic expression includes a process forsubtracting a numerical value indicating the degree of focus of the areato be noticed by a normalization value of a numerical value indicating abrightness of the area to be noticed, and the second arithmeticexpression includes a process for subtracting a numerical valueindicating the degree of focus of the area to be noticed by anormalization value of a difference between the numeral value indicatingthe brightness of the area to be noticed and a numerical valueindicating a brightness of the adjacent area.

Preferably, an excluder for excluding a first portion image having aluminance exceeding a third threshold value from a target to be noticedof the detector, out of the object scene image generated by the imager,is further provided.

Further preferably, a controller for determining whether or not a secondportion image having a luminance exceeding a fourth threshold valuelarger than the third threshold value exists on the object scene imagegenerated by the imager so as to start the excluder when a determinationresult is affirmative while stop the excluder when the determinationresult is negative, is further provided.

More preferably, the determiner renders the determination resultaffirmative when a ratio of a pixel having a luminance exceeding thefourth threshold value to the first portion image exceeds a reference.

In a certain aspect, a pixel detector for detecting, from the objectscene image generated by the imager, a specific pixel having a luminanceexceeding the fourth threshold value is further provided, in which thedeterminer executes a determining process based on the number ofspecific pixels detected by the pixel detector. In another aspect, thepixel detector detects the specific pixel out of the first portionimage.

Preferably, a decreasor for decreasing the third threshold valueaccording to an increase of the second portion image is furtherprovided. The image excluded from the target to be noticed of thedetector increases according to an increase of the second portion image.

Further preferably, the detector integrates a high-frequency componentof the partial image belonging to each of the plurality of areas toobtain the degree of focus, and the excluder prohibits an integralprocess of the detector corresponding to the first portion image.

An imaging control program product according to the present invention isan imaging control program product, executed by a processor of anelectronic camera comprising: an imager, having an imaging surfaceirradiated with an optical image of an object scene through an opticallens, for repeatedly generating an object scene image; an allocator forallocating a plurality of areas on the object scene captured by theimaging surface; and a detector for detecting a degree of focus of apartial image belonging to each of the plurality of areas allocated bythe allocator, out of the object scene image generated by the imager.The imaging control program product comprises: a designating step ofsequentially designating each of the plurality of areas allocated by theallocator as an area to be noticed; a modifying step of modifying thedegree of focus detected by the detecting step corresponding to the areato be noticed to a lower value, as a brightness of the partial imagebelonging to one or more areas including the area to be noticed ishigher; and an adjusting step of adjusting a distance from the opticallens to the imaging surface to a distance corresponding to a focalpoint, with reference to the degree of focus modified by the modifyingstep.

An imaging control method according to the present invention is animaging control method executed by an electronic camera comprising: animager, having an imaging surface irradiated with an optical image of anobject scene through an optical lens, for repeatedly generating anobject scene image; an allocator for allocating a plurality of areas onthe object scene captured by the imaging surface; and a detector fordetecting a degree of focus of a partial image belonging to each of theplurality of areas allocated by the allocator, out of the object sceneimage generated by the imager. The imaging control method comprises: adesignating step of sequentially designating each of the plurality ofareas allocated by the allocator as an area to be noticed; a modifyingstep of modifying the degree of focus detected by the detecting stepcorresponding to the area to be noticed to a lower value, as abrightness of the partial image belonging to one or more areas includingthe area to be noticed is higher, and an adjusting step of adjusting adistance from the optical lens to the imaging surface to a distancecorresponding to a focal point, with reference to the degree of focusmodified by the modifying step.

The above described features and advantages of the present inventionwill become more apparent from the following detailed description of thepresent invention when taken in conjunction with the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a configuration of one embodiment ofthe present invention;

FIG. 2 is an illustrative view showing one example of a photometric areaand a focus area allocated on an imaging surface;

FIG. 3 is a block diagram showing one example of a configuration of aluminance evaluation circuit applied to the embodiment in FIG. 1;

FIG. 4 is a block diagram showing one example of a configuration of afocus evaluation circuit applied to the embodiment in FIG. 1;

FIG. 5 is an illustrative view showing one example of an object scenecaptured by the embodiment in FIG. 1;

FIG. 6 is an illustrative view showing another example of the objectscene captured by the embodiment in FIG. 1;

FIG. 7 is an illustrative view showing one portion of an operation ofthe embodiment in

FIG. 1;

FIG. 8(A) is an illustrative view showing one example of a change of Ydata on a light source and a periphery thereof;

FIG. 8(B) is an illustrative view showing one example of a change of Ydata of which the one portion is missing by a high-luminance excludingfunction;

FIG. 9(A) is an illustrative view showing one example of a change of Ydata on a white board and a periphery thereof;

FIG. 9(B) is an illustrative view showing one example of a change of Ydata of which the one portion is missing by the high-luminance excludingfunction;

FIG. 10(A) is an illustrative view showing one example of a change ofthe Y data;

FIG. 10(B) is an illustrative view showing one portion of an arrangementof an evaluation area;

FIG. 10(C) is an illustrative view showing one example of a change ofluminance evaluation values;

FIG. 11 is a flowchart showing one portion of an operation of a CPUapplied to the embodiment in FIG. 1;

FIG. 12 is a flowchart showing another portion of the operation of theCPU applied to the embodiment in FIG. 1;

FIG. 13 is a flowchart showing still another portion of the operation ofthe CPU applied to the embodiment in FIG. 1;

FIG. 14 is a flowchart showing yet still another portion of theoperation of the CPU applied to the embodiment in FIG. 1;

FIG. 15 is a flowchart showing one portion of a modified example of theembodiment in FIG. 12;

FIG. 16 is a flowchart showing one portion of another modified exampleof the embodiment in FIG. 12;

FIG. 17 is a flowchart showing one portion of still another modifiedexample of the embodiment in FIG. 12;

FIG. 18(A) is an illustrative view showing another example of a changeof Y data on the light source and a periphery thereof; and

FIG. 18(B) is an illustrative view showing another example of a changeof the Y data of which the one portion is missing by the high-luminanceexcluding function.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

With reference to FIG. 1, a digital camera 10 according to thisembodiment includes a focus lens 12 and an aperture unit 14. An opticalimage of an object scene through these members is irradiated onto afront surface, i.e., an imaging surface of an imaging portion 18configuring a CMOS-type image sensor 16, and is then photoelectricallyconverted. Thereby, a raw image signal formed of electric chargesrepresenting an object scene image is generated.

When a power source is turned on, a through-image process is executed. ACPU 46 instructs a driver 22 configuring the image sensor 16 to repeatpre-exposure operations and thin-out reading operations. The driver 22exposes the imaging surface at each time a vertical synchronizationsignal Vsync is outputted from an SG (Signal Generator) 24, and readsout a part of the electric charges thus generated from the imagingportion 18 in a raster scanning mode. The vertical synchronizationsignal Vsync is outputted from the SG 24 at every 1/60 seconds. As aresult, a low-resolution raw image signal is outputted from the imagingportion 18 at every 1/60 seconds. It is noted that a generation cycle ofthe vertical synchronization signal Vsync is assumed as 1/60 seconds inthis embodiment but the generation cycle is not limited thereto.

The raw image signal of each frame, outputted from the imaging portion18, is subjected to a series of processes such as a correlation doublesampling, an automatic gain adjustment, and an A/D conversion by aCDS/AGC/AD circuit 20 configuring the image sensor 16. Asignal-processing circuit 26 applies processes such as a white balanceadjustment, a color separation, and a YUV conversion to the raw imagedata outputted from the CDS/AGC/AD circuit 20 and writes YUV-formattedimage data to an SDRAM 34 through a memory control circuit 32.

An LCD driver 36 reads out the image data thus written to the SDRAM 34through the memory control circuit 32 at every 1/60 seconds, and drivesan LCD monitor 38 based on the read-out image data. As a result, areal-time moving image (a through image) of the object scene isdisplayed on a monitor screen.

With reference to FIG. 2, a photometric area EA and a focus area FA areallocated in a center of the imaging surface. The photometric area EAand the focus area FA have the same size to each other and are arrangedin the same position to each other. Also, both the photometric area EAand the focus area FA are divided into eight parts in each of a verticaldirection and a horizontal direction. That is, each of the photometricarea EA and the focus area FA is formed of 64 evaluation areas havingthe same size to each other. These 64 evaluation areas are respectivelyallocated with coordinate values (X,Y)=(1,1) to (8,8).

A luminance evaluation circuit 28 integrates Y data belonging to eachevaluation area, out of the Y data outputted from the signal-processingcircuit 26, at every 1/60 seconds, and then, calculates 64 luminanceevaluation values (brightness information) respectively corresponding tothe 64 evaluation areas at every 1/60 seconds. A focus evaluationcircuit 30 integrates a high-frequency component of the Y data belongingto each evaluation area, out of the Y data outputted from thesignal-processing circuit 26, at every 1/60 seconds, and then,calculates 64 focus evaluation values (focus degree information)respectively corresponding to the 64 evaluation areas at every 1/60seconds.

In order to calculate an appropriate EV value based on the luminanceevaluation values outputted from the luminance evaluation circuit 28,the CPU 46 repeatedly executes AE processes for the through-image, inparallel with the above-described through-image process. An amount ofaperture and an exposure time period, which define the calculatedappropriate EV value, are set to the aperture unit 14 and the driver 22,respectively. As a result, a brightness of the through image displayedon the LCD monitor 38 is appropriately adjusted.

When a shutter button 48 s on a key input device 48 is operated, the CPU46 executes an AE process for recording in order to calculate an optimalEV value based on the luminance evaluation values outputted from theluminance evaluation circuit 28. An amount of aperture and an exposuretime period, which define the calculated optimal EV value, are set tothe aperture unit 14 and the driver 22, respectively, in the same manneras described above. The CPU 46 further executes an AF process based onthe focus evaluation values outputted from the focus evaluation circuit30. The focus lens 12 is arranged at a focal point by the AF process.

When the AF process is completed, a recording process is executed. TheCPU 46 instructs the driver 22 to execute a main exposure operation andall-pixel reading, one time each. The driver 22 applies a main exposureto the imaging surface in response to a generation of the verticalsynchronization signal Vsync and reads out all the electric charges thusgenerated from the imaging portion 18 in a raster scanning mode. As aresult, the high-resolution raw image signal representing the objectscene is outputted from the imaging portion 18.

The outputted raw image signal is processed with similar processes asdescribed above, and thus, the high-resolution image data according tothe YUV format is saved in the SDRAM 34. An I/F 40 reads out thehigh-resolution image data thus stored in the SDRAM 34 through thememory control circuit 32, and then, records the read-out image data ona recording medium 42 in a file format. It is noted that thethrough-image process is resumed when the high-resolution image data isstored in the SDRAM 34.

With reference to FIG. 3, the luminance evaluation circuit 28 includesone distributor 50 and 64 integration circuits 5601 to 5664. The 64integration circuits 5601 to 5664 respectively correspond to the 64evaluation areas. The distributor 50 fetches the Y data outputted fromthe signal-processing circuit 26, specifies the evaluation area to whichthe fetched Y data belongs, and applies the fetched Y data to theintegration circuit corresponding to the specified evaluation area.

The integration circuit 56** (**:01 to 64) is formed of an adder 52**and aregister 54**. The adder 52** adds a Y data value applied from thedistributor 50, with a setting value of the register 54**, and then,sets the added value to the register 54**. The setting value of theregister 54** is cleared at each generation of the verticalsynchronization signal Vsync. Therefore, the setting value of theregister 54** represents an integrated value of the Y data belonging toeach evaluation area of a current frame. This integrated valuecorresponds to the above-described luminance evaluation value.Hereinafter, the luminance evaluation value acquired on the evaluationarea (X,Y) is defined as “AE (X,Y)”.

With reference to FIG. 4, the focus evaluation circuit 30 includes anHPF 56 for extracting the high-frequency component of the Y dataoutputted from the signal-processing circuit 26, and a comparator 58 forcomparing, with a reference value REF, the Y data value outputted fromthe signal-processing circuit 26. The comparator 58 turns on a switchSW1 when the Y data value is equal to or less than the reference valueREF, and turns off the switch SW1 when the Y data value exceeds thereference value REF. The high-frequency component outputted from the HPF56 is applied to a distributor 60 via the switch SW1.

The integration circuits 6601 to 6664 respectively correspond to the 64evaluation areas in the same manner as described above. The distributor60 fetches the high-frequency component outputted from the switch SW1,specifies the evaluation area to which the fetched high-frequencycomponent belongs, and applies the fetched high-frequency component tothe integration circuit corresponding to the specified evaluation area.

The integration circuit 66** is formed of an adder 62** and a register64**. The adder 62** adds the Y data value applied from the distributor60, with a setting value in the register 64**, and then, sets the addedvalue to the register 64**. The setting value in the register 64** isalso cleared at each generation of the vertical synchronization signalVsync. Therefore, the setting value of the register 64** represents theintegrated value of the high-frequency component of the Y data belongingto each evaluation area of the current frame. This integrated valuecorresponds to the above-described focus evaluation value. Hereinafter,the focus evaluation value acquired on the evaluation area (X,Y) isdefined as “AF (X,Y)”.

Each of FIG. 5 and FIG. 6 shows an object scene image when capturing ascene of a class in a woodwork classroom equipped with a whiteboard WB.A main difference between FIG. 5 and FIG. 6 is presence of a lightsource LS. When the object scene shown in FIG. 5 is captured by focusingon an object different from the light source LS, a blurred image causedby defocusing of the light source LS notably appears on a periphery ofan image representing the light source LS (see FIG. 7). On the otherhand, in an object different from the light source, such as thewhiteboard WB, the blurred image caused by the defocusing does notnotably appear on a periphery of the object.

A size of the blurred image that appears on a periphery of the lightsource LS increases as a degree of focus on the light source LSdecreases. Generally, the Y data value of the light source LS issaturated, and thus, an amount of the high-frequency componentcorresponding to an edge of the image representing the light source LS,i.e., the focus evaluation value, increases as the degree of focus onthe light source LS decreases. Thereby, when the AF process is executedin view of the light source LS, there is a possibility that the focuslens 12 may be set to a defocusing position.

Considering the above fact, in this embodiment, a light-sourcedetermining process for determining whether or not the object sceneincludes a light source is executed prior to the AF process, andthereby, a magnitude of the reference value REF applied to a+(positive)terminal of the comparator 58 shown in FIG. 4 is changed depending upona determined result. The reference value REF is set to “TH1”corresponding to the object scene that includes the light source LS asshown in FIG. 5, whereas it is set to “THmax” corresponding to theobject scene that does not include a light source LS as shown in FIG. 6.It is noted that “THmax” corresponds to a luminance saturation value,and “TH1” is less than “THmax”.

In order to determine whether or not the light source LS is included, aratio of a partial image having a Y data value above “TH2” to a partialimage having a Y data value above “TH1” is referenced (TH2>TH1). Morespecifically, the number of pixels in which the Y data value exceeds“TH1” is evaluated as a coefficient K1, and the number of pixels inwhich the Y data value exceeds “TH2” is evaluated as a coefficient K2,and then, “K2/K1” is compared with a threshold value THR. When “K2/K1”exceeds the threshold value THR, it is interpreted that the light sourceLS is present, and thus, the reference value REF is set to “TH1”. On theother hand, when “K2/K1” is equal to or less than the threshold valueTHR, it is interpreted that the light source LS is not present, andthus, the reference value REF is set to “THmax”.

As described above, when photographing the object scene shown in FIG. 5,the reference value REF is set to “TH1”, and when photographing theobject scene shown in FIG. 6, the reference value REF is set to “THmax”.When Y data on the light source LS shown in FIG. 5 and a peripherythereof are changed in a manner shown in FIG. 8(A); and Y data on thewhiteboard WB shown in FIG. 5 or FIG. 6 and a periphery thereof arechanged in a manner shown in FIG. 9(A), an operation of the focusevaluation circuit 30 differs between the object scene shown in FIG. 5and the object scene shown in FIG. 6 as follows:

When photographing the object scene shown in FIG. 5, the switch SW1 isturned off during a time period T1 shown in FIG. 8(B) and a time periodT2 shown in FIG. 9(B). As a result, the images of the light source LSand the whiteboard WB as well as the periphery thereof are excluded froma target of the integral processes executed by the integration circuits6601 to 6664. On the other hand, when photographing the object sceneshown in FIG. 6, the switch SW1 is turned on at all times. Theintegration circuits 6601 to 8864 execute integral processes to all theobject scene images belonging to the focus area FA.

A high-luminance excluding function (a function for excluding the highluminance image above “TH1” from the focus evaluation target), which isdescribed above, is turned on when capturing the object scene includingthe light source LS shown in FIG. 5, thereby making it possible to avoida situation in which focusing control fails due to the blurred image ofthe light source LS. Also, the high-luminance excluding function isturned off when capturing the object scene that does not include thelight source LS shown in FIG. 6, thereby enabling the whiteboard WB tobe included in the focus evaluation target, thus stabilizing thefocusing control.

However, according to FIG. 8(A) and FIG. 8(B), the high-frequencycomponents outputted from the HPF 56 immediately before and after thetime period T1 are included in the target of the integral processesexecuted by the integration circuits 6601 to 6664. As a result, theblurred image of the light source LS may hinder the correct focusingcontrol. To avoid this problem, when “TH1” is set lower, thehigh-frequency component of the blurred image may surely be excludedfrom the target of the integral process, but this will cause thehigh-frequency component of a moderate luminance object to be excludedfrom the target of the integral process, and thus, the focusing controlmay become impossible.

Considering the above fact, in this embodiment, the focus evaluationvalue AF (X,Y) acquired by the integral process is modified into asmaller value, as brightness of the evaluation area (X,Y) and that ofsurrounding evaluation areas are higher. As a result, the focusingcontrol is executed by considering the high-frequency component of alow-luminance image rather than the high-frequency component of ahigh-luminance image.

More specifically, the focus evaluation value AF (X,Y) is modified bythe CPU 46 according to a manner described below. At first, the focusevaluation value AF (X,Y) is compared with a threshold value THL1. WhenAF (X,Y)>THL1, the focus evaluation value AF (X,Y) is modified accordingto Equation 1.AF(X,Y)=AF(X,Y)−AE(X,Y)*α  [Equation 1]

α: a constant for normalization

According to Equation 1, the focus evaluation value AF (X,Y) issubtracted by a numerical value that is a times the luminance evaluationvalue AE (X,Y).

When AF (X,Y)≦THL1, focus evaluation values AF (X−1,Y), AF (X+1,Y), AF(X, Y−1), or AF (X,Y+1) acquired on adjacent evaluation areas (X−1,Y),(X+1,Y), (X, Y−1), or (X, Y+1) are compared with a threshold value THL2.

The focus evaluation value AF (X,Y) is modified according to Equation 2when AF (X−1,Y)>THL2; according to Equation 3 when AF (X+1,Y)>THL2;according to Equation 4 when AF (X,Y−1)>THL2; and according to Equation5 when AF (X,Y+1)>THL2. It is noted that the threshold value THL2 issmaller than the threshold value THL1.AF(X,Y)=AF(X,Y)−|AE(X−1,Y)−AE(X,Y)|*β  [Equation 2]

β: a constant for normalizationAF(X,Y)=AF(X,Y)−|AE(X+1,Y)−AE(X,Y)|*β  [Equation 3]AF(X,Y)=AF(X,Y)−|AE(X,Y−1)−AE(X,Y)|*β  [Equation 4]AF(X,Y)=AF(X,Y)−|AE(X,Y+1)−|AE(X,Y)|*β  [Equation 5]

According to Equation 2, the focus evaluation value AF (X,Y) issubtracted by a numerical value that is β times an absolute value of adifference between luminance evaluation values AE (X−1,Y) and AE (X,Y).According to Equation 3, the focus evaluation value AF (X, Y) issubtracted by a numerical value that is β times an absolute value of adifference between luminance evaluation values AE (X+1, Y) and AE (X,Y).According to Equation 4, the focus evaluation value AF (X,Y) issubtracted by a numerical value that is β times an absolute value of adifference between luminance evaluation values AE (X, Y−1) and AE (X,Y).According to Equation 5, the focus evaluation value AF (X,Y) issubtracted by a numerical value that is β times an absolute value of adifference between luminance evaluation values AE (X,Y+1) and AE (X, Y).

With reference to FIGS. 10(A) to 10(C), when the luminance evaluationvalues AE (4, 2) and AE (5,2) based on the Y data adjacent to an end ofthe above-described time period T1 respectively satisfy conditions of AE(4,2)>THL1 and AE (5,2)≦THL1, the focus evaluation value AF (4,2) ismodified according to Equation 1, and the focus evaluation value AF(5,2) is modified according to Equation 2. To be exact, the focusevaluation value AF (4,2) is modified according to Equation 1 when “AE(4,2)>THL1”, while the focus evaluation value AF (5,2) is modifiedaccording to Equation 2 when “AE (4,2)>THL2” and “AE (5,2)≦THL1”.However, “THL1>THL2” is established, and thus, when “AE (4,2)>THL1” issatisfied, “AE (4,2)>>THL2” is also satisfied. Considering this, in theabove description, only “AE (5,2)≦THL1” is given as a condition formodifying the focus evaluation value AF (5,2) according to Equation 2.

The CPU 46 executes a plurality of tasks, including image-controllingtasks shown in FIG. 11 to FIG. 14, in a parallel manner. It is notedthat a control program corresponding to these tasks is stored in a flashmemory 44.

With reference to FIG. 11, the through-image process is executed in astep S1. As a result, the through-image representing the object scene isoutputted from the LCD monitor 38. In a step S3, it is determinedwhether or not the shutter button 48 s is operated. As long as NO isdetermined, the AE process for the through-image in a step S5 isrepeatedly executed. As a result, the brightness of the through-imagedisplayed on the LCD monitor 38 is appropriately adjusted. When theshutter button 48 s is operated, the AE process for recording isexecuted in a step S7, the light-source determining process is executedin a step S9, the AF process is executed in a step S11, and therecording process is executed in a step S13.

As a result of the process in the step S7, the amount of aperture andthe exposure time period, which define the optimal EV value, are set tothe aperture unit 14 and the driver 22, respectively. Also, as a resultof the process in the step S9, the “TH1” is set to the reference valueREF when capturing the object scene including the light source, whilethe “THmax” is set to the reference value REF when capturing the objectscene that does not include the light source. Furthermore, as a resultof the process in the step S11, the focus lens 12 is arranged at thefocal point Also, as a result of the process in the step S13, thehigh-resolution image data representing an object scene immediatelyafter the focus lens 12 is arranged at the focal point is recorded onthe recording medium 42.

The light-source determining process in the step S9 shown in FIG. 11 isexecuted according to a subroutine shown in FIG. 12. In a step S21, eachof the coefficients K1 and K2 is set to “0” in response to thegeneration of the vertical synchronization signal Vsync. In a step S23,it is determined whether or not a current pixel is a start pixel (apixel arranged at an upper left in the coordinate) for the focus areaFA, and when YES is determined, it is determined in a step S25 whetheror not the Y data value of the current pixel exceeds “TH1”. When the Ydata value>TH1 is established, the process proceeds from the step S25 toa step S27 to increment the coefficient K1. In a step S29, it isdetermined whether or not the Y data value of the current pixel exceeds“TH2”, and when YES is determined, the coefficient K2 is incremented ina step S31. Because TH2>TH1 is established, when the Y data valueexceeds “TH1” and equal to or less than “TH2”, only the coefficient K1is incremented, and when the Y data value exceeds “TH2”, thecoefficients K1 and K2 are both incremented.

When NO is determined in the steps S25 or S29 or upon completion of theprocess in the step S31, it is determined whether or not the currentpixel is an end pixel (a pixel arranged at a lower right in thecoordinate) of the focus area FA. When NO is determined in this step,the process returns to the step S23. However, when YES is determined,the process proceeds to a step S35. In the step S35, it is determinedwhether or not the ratio of the coefficient K2 to the coefficient K1,i.e., K2/K1, exceeds the threshold value THR. When YES is determined inthis step, the process proceeds to a step S37 to set “TH1” as thereference value REF. On the other hand, when NO is determined, theprocess proceeds to a step S39 to set “THmax” to the reference valueREF. Upon completion of the process in the step S37 or S39, the processreturns to an upper hierarchical routine.

The AF process in the step S11 shown in FIG. 11 is executed according toa subroutine shown in FIGS. 13 and 14. When the vertical synchronizationsignal Vsync is generated, YES is determined in a step S41, and thecoordinate value (X,Y) is set to (1,1). In a step S45, it is determinedwhether or not the luminance evaluation value AE (X,Y) exceeds thethreshold value THL1. When YES is determined in this step, the processproceeds to a step S47 to modify the focus evaluation value AF (X,Y)according to Equation 1. In a step S49, the coordinate value (X, Y) isupdated in a raster scanning direction, and in a step S51, it isdetermined whether or not the updated coordinate value (X,Y) shows(8,8).

When NO is determined in this step, the process returns to the step S45,and when YES is determined, a lens moving process (hill-climbing AFprocess) is executed in a step S53. As a result of the process in thestep S53, the focus lens 12 moves in a direction in which a total valueof the focus evaluation values AF (1,1) to AF (8,8) increases. In a stepS55, it is determined whether or not the focus lens 12 reaches a focalpoint, and when NO is determined, the process returns to the step S41.However, when YES is determined, the process returns to an upperhierarchical routine.

When NO is determined in the step S45, it is determined whether or notthe focus evaluation value AF (X−1, Y) exceeds the threshold value THL2in a step S57, whether or not the focus evaluation value AF (X+1, Y)exceeds the threshold value THL2 in a step S59, whether or not the focusevaluation value AF (X, Y−1) exceeds the threshold value THL2 in a stepS61, and whether or not the focus evaluation value AF (X, Y+1) exceedsthe threshold value THL2 in a step S63.

When YES is determined in the step S57, the process proceeds to a stepS65 to modify the focus evaluation value AF (X,Y) according to Equation2. When YES is determined in the step S59, the process proceeds to astep S67 to modify the focus evaluation value AF (X,Y) according toEquation 3. When YES is determined in the step S61, the process proceedsto a step S69 to modify the focus evaluation value AF (X,Y) according toEquation 4. When YES is determined in the step S63, the process proceedsto a step S71 to modify the focus evaluation value AF (X,Y) according toEquation 5.

Upon completion of the process in the step S65, S67, S69, or S71, orwhen NO is determined in any of the steps S57, S59, S61, and S63, theprocess returns to the step S49.

As is apparent from the above descriptions, the image sensor 16 has animaging surface irradiated with the optical image of the object scenethrough the focus lens 12, and repeatedly generates the object sceneimages. The focus evaluation circuit 30 allocates a plurality ofevaluation areas on the object scene captured by the imaging surface anddetects the degree of focus of the partial image belonging to each ofthe plurality of evaluation areas.

However, the CPU 46 has the high-luminance excluding function (S37) forexcluding, from a target to be noticed of the focus evaluation circuit30, the partial image having a luminance exceeding “TH1”, out of theobject scene image generated by the image sensor 16. The CPU 46determines whether or not a partial image having a luminance exceeding“TH2”, which is greater than “TH1”, is present on the object sceneimage, and turns on the high-luminance excluding function when thedetermination result is affirmative, whereas the CPU 46 turns off thehigh-luminance excluding function when the determination result isnegative (S35, S39).

The CPU 46 also sequentially designates, as an area to be noticed, eachof the plurality of evaluation areas allocated on the object scene image(S43, S49), and modifies, to a lower value, the degree of focus detectedcorresponding to the area to be noticed, as the brightness of thepartial image belonging to one or more areas including the area to benoticed is higher (S47, S65 to S71).

The CPU 46 executes the hill-climbing AF process with reference to thedegree of focus thus modified. The focus lens 12 is positioned at thefocal point by the hill-climbing AF process.

When an image of a white subject such as a whiteboard WB is assumed as apartial image having a luminance exceeding “TH1” and equal to or lessthan “TH2”, and an image of the light source LS is assumed as a partialimage having the luminance exceeding “TH2”, a focus adjustment operationdiffers between a case of capturing an object scene including both thewhiteboard WB and the light source LS and that of capturing an objectscene including only the whiteboard WB out of the whiteboard WB and thelight source LS as follows:

That is, the high-luminance excluding function is turned on whencapturing the former object scene, and thus, the focusing adjustmentoperation is executed with reference to objects other than thewhiteboard WB and the light source LS. On the other hand, thehigh-luminance excluding function is turned off when capturing thelatter object scene, and thus, the focusing adjustment operation isexecuted with reference to objects that include the whiteboard WB.

Also, the degree of focus of the area to be noticed is modified into asmaller value, as the brightness of the area that includes the area tobe noticed is higher. As a result, the focusing adjustment operation isexecuted by applying much importance to a low-luminance image than to ahigh-luminance image.

As a result, it becomes possible to correctly arrange the focus lens 12at the focal point while avoiding the defocusing caused by the blurredimage on a periphery of the light source LS.

It is noted that the light-source determining process shown in FIG. 12focuses on the ratio of the coefficient K2 to the coefficient K1 (K2/K1)in order to determine which value, i.e., “TH1” or “THmax”, is used asthe reference value REF, and however, instead thereof, the magnitude ofthe coefficient K2, i.e., the number of pixels in which the Y data valueexceeds “TH2”, may be focused. In this case, as shown in FIG. 15, it ispreferable to execute a step S81 for determining whether or not thecoefficient K2 exceeds a threshold value THN instead of the step S35shown in FIG. 12. When the step S81 is replaced by the step S35, thesteps S25 to S27 shown in FIG. 12 may not necessarily be executed.

Also, in the light-source determining process shown in FIG. 12, only“TH1” is used as the numerical value set to the reference value REF whenthe light source LS is present. However, the numerical value set to thereference value REF when the light source LS is present may be changedaccording to a size of the image corresponding to the light source LS.In this case, it is preferable to add a step S35′ and a step S37′ shownin FIG. 16 to the process shown in FIG. 12, or add a step S81′ and astep S37′ shown in FIG. 17 to the process shown in FIG. 15.

According to FIG. 16, it is determined whether or not “K2/K1” exceeds athreshold value THR′ (THR′>THR) in the step S35′. When YES is determinedin this step, “TH1-ΔTH” is set to the reference value REF in the stepS37′. According to FIG. 17, it is determined whether or not “K2” exceedsthe threshold value THN′ (THN′>THN) in the step S81′. When YES isdetermined in this step, “TH1-ΔTH” is set to the reference value REF inthe step S37′.

As a result, when the Y data representing the light source LS changes asshown in FIG. 18(A), the switch SW1 shown in FIG. 4 is turned off duringa time period T3 shown in FIG. 18(B). By executing the processes shownin FIG. 16 or FIG. 17, it becomes possible to switch a magnitude of thehigh-luminance excluding function according to the size of the imagerepresenting the light source LS.

Although the present invention has been described and illustrated indetail, it is clearly understood that the same is by way of illustrationand example only and is not to be taken by way of limitation, the spiritand scope of the present invention being limited only by the terms ofthe appended claims.

1. An electronic camera, comprising: an imager, having an imagingsurface irradiated with an optical image through an optical lens, whichrepeatedly outputs an electronic image corresponding to the opticalimage; an adjustor which adjusts a distance from said optical lens tosaid imaging surface to a distance corresponding to a focal point, basedon the electronic image outputted from said imager; an excluder whichexecutes a process of excluding from a target to be noticed by saidadjustor a first portion image having a luminance exceeding a firstthreshold value, out of the electronic image outputted from said imager,when a second portion image having a luminance exceeding a secondthreshold value larger than the first threshold value exists on theelectronic image outputted from said imager; and a decreasor whichdecreases the first threshold value according to an increase of an areaof the second portion image noticed by said excluder.
 2. An electroniccamera according to claim 1, further comprising a determiner whichrespectively determines whether or not the second portion image existson the electronic image outputted from said imager, wherein saidexcluder executes the process during a time period in which adetermination result of said determiner indicates an affirmative result.3. An electronic camera according to claim 2, wherein said determinerrenders the determination result affirmative when a ratio of pixelshaving a luminance exceeding the second threshold value to pixels of thefirst portion image exceeding the first threshold value, exceeds areference.
 4. An electronic camera according to claim 2, furthercomprising a pixel detector which detects the number of specific pixelshaving a luminance exceeding the second threshold value from theelectronic image outputted from said imager, wherein said determinerexecutes a determining process based on the number of specific pixelsdetected by said pixel detector.
 5. An electronic camera according toclaim 4, wherein said pixel detector detects the specific pixels fromwithin the first portion image.
 6. An electronic camera according toclaim 1, further comprising an integrator which integrates ahigh-frequency component of the electronic image outputted from saidimager, wherein said adjustor includes an adjustment executor whichexecutes an adjusting process by referencing an integral result of saidintegrator, and said excluder prohibits the integral process of saidintegrator corresponding to the first portion image.
 7. An electroniccamera according to claim 6, wherein said integrator individuallyintegrates a plurality of high-frequency components respectivelycorresponding to a plurality of areas allocated on said imaging surface,and said adjustor further includes a designator which sequentiallydesignates each of said plurality of areas as an area to be noticed, anda modifier which modifies the integral result of said integratorcorresponding to the area to be noticed to a lower value, as abrightness of a partial image belonging to one or more areas includingthe area to be noticed is higher.
 8. An electronic camera according toclaim 7, wherein said modifier includes a first modification processorwhich executes a first modification process according to a firstarithmetic expression when a brightness of a partial image belonging tothe area to be noticed exceeds a third threshold value, and a secondmodifier which executes a second modification process according to asecond arithmetic expression when a brightness of a partial imagebelonging to an adjacent area adjacent to the area to be noticed exceedsa fourth threshold value.
 9. An electronic camera according to claim 8,wherein the first modification process and the second modificationprocess are selectively executed, and the first modification processtakes precedence to the second modification process.
 10. An electroniccamera according to claim 8, wherein the first arithmetic expressionincludes a process for subtracting a numerical value indicating theintegral result of the area to be noticed by a normalization value of anumerical value indicating the brightness of the area to be noticed, andthe second arithmetic expression includes a process for subtracting thenumerical value indicating the integral result of the area to be noticedby a normalization value of a difference between the numeral valueindicating the brightness of the area to be noticed and a numericalvalue indicating a brightness of the adjacent area.
 11. A computerprogram embodied in a tangible medium, which is executed by a processorof an electronic camera comprising an imager, having an imaging surfaceirradiated with an optical image through an optical lens, whichrepeatedly outputs an electronic image corresponding to the opticalimage, the program, comprising: an adjusting step of adjusting adistance from said optical lens to said imaging surface to a distancecorresponding to a focal point, based on the electronic image outputtedfrom said imager; an excluding step of executing process of excluding afirst portion image having a luminance exceeding a first threshold valuefrom a target to be noticed by said adjusting step, out of theelectronic image outputted from said imager, when a second portion imagehaving a luminance exceeding a second threshold value larger than thefirst threshold value exists on the electronic image outputted from saidimager; and a decreasing step of decreasing the first threshold valueaccording to an increase of an area of the second portion image noticesby said excluding step.
 12. An imaging control method executed by anelectronic camera comprising an imager, having an imaging surfaceirradiated with an optical image through an optical lens, whichrepeatedly outputs an electronic image corresponding to the opticalimage, the imaging control method, comprising: an adjusting step ofadjusting a distance from said optical lens to said imaging surface to adistance corresponding to a focal point, based on the electronic imageoutputted from said imager; an excluding step of executing a process ofexcluding a first portion image having a luminance exceeding a firstthreshold value from a target to be noticed by said adjusting step, outof the electronic image outputted from said imager, when a secondportion image having a luminance exceeding a second threshold valuelarger than the first threshold value exists on the electronic imageoutputted from said imager; and a decreasing step of decreasing thefirst threshold value according to an increase of an area of the secondportion image noticed by said excluding step.
 13. An electronic cameracomprising: an imager, having an imaging surface irradiated with anoptical image through an optical lens, which repeatedly outputs anelectronic image corresponding to the optical image; an adjustor whichadjusts a distance from said optical lens to said imaging surface to adistance corresponding to a focal point, based on the electronic imageoutputted from said imager; an excluder which excludes from a target tobe noticed by said adjustor a first portion image having a luminanceexceeding a first threshold value, out of the electronic image outputtedfrom said imager; and a controller which determines whether or not asecond portion image having a luminance exceeding a second thresholdvalue larger than the first threshold value exists on the electronicimage outputted from said imager so as to start said excluder when adetermination result is affirmative, and stopping said excluder when thedetermination result is negative.
 14. A computer program embodied in atangible medium, which is executed by a processor of an electroniccamera comprising an imager, having an imaging surface irradiated withan optical image through an optical lens, which repeatedly outputs anelectronic image corresponding to the optical image, the program,comprising: an adjusting step of adjusting a distance from said opticallens to said imaging surface to a distance corresponding to a focalpoint, based on the electronic image outputted from said imager; anexcluding step of excluding a first portion image having a luminanceexceeding a first threshold value from a target to be noticed by saidadjusting step, out of the electronic image outputted from said imager;and a controlling step of determining whether or not a second portionimage having a luminance exceeding a second threshold value larger thanthe first threshold value exists on the electronic image outputted fromsaid imager so as to start said excluding step when a determinationresult is affirmative, and stopping said excluding step when thedetermination result is negative.
 15. An imaging control method executedby an electronic camera comprising an imager, having an imaging surfaceirradiated with an optical image through an optical lens, whichrepeatedly outputs an electronic image corresponding to the opticalimage, the imaging control method, comprising: an adjusting step ofadjusting a distance from said optical lens to said imaging surface to adistance corresponding to a focal point, based on the electronic imageoutputted from said imager; an excluding step of excluding a firstportion image having a luminance exceeding a first threshold value froma target to be noticed by said adjusting step, out of the electronicimage outputted from said imager; and a controlling step of determiningwhether or not a second portion image having a luminance exceeding asecond threshold value larger than the first threshold value exists onthe electronic image outputted from said imager so as to start saidexcluding step when a determination result is affirmative, and stoppingsaid excluding step when the determination result is negative.